package tjs.study.notes.eureka.clienta.user.service.feign;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Nicky.Tang on 2021/10/31 4:52 下午
 *
 * @since 02.12.10
 */
@Service
public class OrederFeignService {
    private static final Logger logger = LoggerFactory.getLogger(OrederFeignService.class);
    @Autowired
    private OrederFeignApi orederFeignApi;

    public void newOrder(String userId, Integer sleepTime, StringBuilder stepBui) {
        String response = orederFeignApi.newOrder(userId, sleepTime);
        stepBui.append(response).append("\n");
        logger.warn(response);
    }
}
